package com.dongdongshop.service.impl;

import com.dongdongshop.mapper.UserMapper;
import com.dongdongshop.pojo.User;
import com.dongdongshop.pojo.UserExample;
import com.dongdongshop.service.UserService;
import org.apache.dubbo.config.annotation.DubboService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
//前台用户表
@DubboService
@Service
public class UserServiceimpl implements UserService {


    @Autowired
    UserMapper um;

    //根据用户名查询此条记录是否存在
    @Override
    public User byuser(String username) {
        return um.byuser(username);

    }


    //注册增加
    @Override
    public int login(User use) {
       return  um.insertSelective(use);
    }


    //修改密码
    @Override
    public int updatepwd(String username, String md5) {
        return um.updatepwd(username,md5);
    }
}
